<?php

namespace Lib\Dao\Jocnet;
use Illuminate\Support\Facades\DB;

define('CAMPOS_TABLA_LOGS_JOCNET','id,tipo,texto,fecha,ip,navegador,device');

class LogsDao {
	
	var $tabla = 'logs';

	function getAllLogs(){
		
		$queryString="SELECT ".CAMPOS_TABLA_LOGS_JOCNET." FROM logs ";
		
		try {
			return DB::select($queryString);
		} catch (\Exception $e) {
			LogsDao::nuevo("Error->".__FUNCTION__,$e->getMessage());
		}
		
	}
  
	public function getTotalLogs(){
		$queryString = "SELECT count(id) as total FROM logs";
		
		try {
			return DB::select($queryString);
		} catch (\Exception $e) {
			LogsDao::nuevo("Error->".__FUNCTION__,$e->getMessage());
		}
	}
	
	

	
	
	
	
	
}


?>
